Emulate WinXP's drawing of menu separators
authorDom Lachowicz <doml@src.gnome.org>
Sat, 1 Apr 2006 16:28:00 +0000 (16:28 +0000)
committerDom Lachowicz <doml@src.gnome.org>
Sat, 1 Apr 2006 16:28:00 +0000 (16:28 +0000)
ChangeLog
ChangeLog.pre-2-10
modules/engines/ms-windows/Theme/gtk-2.0/gtkrc
modules/engines/ms-windows/msw_style.c

index 857cec3e2b6732558665f55121d981b4e98b35cd..2b07962d1564f33e60b10d36a614fdd8e1b6716f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-01  Dom Lachowicz <cinamod@hotmail.com>
+
+       * modules/engines/ms-windows/msw_style.c (draw_hline): Emulate WinXP's
+       drawing of menu separators
+       
 2006-03-31  Behdad Esfahbod  <behdad@gnome.org>
 
        * gtk/gtkrecentmanager.c: Convert filenames to UTF-8 before printing
index 857cec3e2b6732558665f55121d981b4e98b35cd..2b07962d1564f33e60b10d36a614fdd8e1b6716f 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-01  Dom Lachowicz <cinamod@hotmail.com>
+
+       * modules/engines/ms-windows/msw_style.c (draw_hline): Emulate WinXP's
+       drawing of menu separators
+       
 2006-03-31  Behdad Esfahbod  <behdad@gnome.org>
 
        * gtk/gtkrecentmanager.c: Convert filenames to UTF-8 before printing
index f16082e42f48fdbf93104abc3da78a26262784e0..39f2a7b14cfbbfc07effb46488be0af9a6decb5b 100755 (executable)
@@ -34,9 +34,10 @@ style "msw-default"
 
   GtkScrolledWindow::scrollbar_spacing = 1
 
+  GtkSeparatorMenuItem::horizontal-padding = 2
+
   engine "wimp" 
   {
   }
 }
-class "*" style "msw-default"
-
+class "*" style "msw-default"
\ No newline at end of file
index 74826269715cee5b4a91293fafb4d2ef8f3e81cb..fdcf99ae325e05444be3329d79e52b7eb95457e9 100755 (executable)
@@ -2373,8 +2373,22 @@ draw_hline (GtkStyle * style,
            GtkWidget * widget,
            const gchar * detail, gint x1, gint x2, gint y)
 {
+  if (xp_theme_is_active () && detail && !strcmp(detail, "menuitem")) {
+       if(xp_theme_draw (window, XP_THEME_ELEMENT_MENU_SEPARATOR, style, x1, y, x2, 1, state_type, area))
+               return;
+       else {
+           if (area)
+             gdk_gc_set_clip_rectangle (style->dark_gc[state_type], area);
+
+           gdk_draw_line (window, style->dark_gc[state_type], x1, y, x2, y);
+
+           if (area)
+             gdk_gc_set_clip_rectangle (style->dark_gc[state_type], NULL);
+       }
+  } else {
     parent_class->draw_hline (style, window, state_type, area, widget,
                              detail, x1, x2, y);
+  }
 }
 
 static void